/* Firefox userChrome.css tweaks ********************************************************/
/* Github: https://github.com/aris-t2/customcssforfx ************************************/
/****************************************************************************************/


/****************************
******* BUTTONS *************
****************************/

/*******************************************/
/* Classic Button ui on bookmarks toolbar **/
/*******************************************/

/* back button adjustment */
#PersonalToolbar #back-button .toolbarbutton-icon {
  border: 0 !important;
}

/* adjust zoom reset and copy buttons position */
#PersonalToolbar :is(#copy-button,#zoom-reset-button) {
  margin-inline-start: -1px !important;
  margin-inline-end: -1px !important;
}
#PersonalToolbar :is(#edit-controls, #zoom-controls) separator {
  visibility: collapse !important;
}

/* button spacing */
#PersonalToolbar .toolbarbutton-1{
  margin-left: 1px !important;
  margin-right: 1px !important;
}

/* classic button style */
#main-window:not([customizing]) #PersonalToolbar .toolbarbutton-1[disabled=true]:is([open],[checked],:hover:active,:active),
#PersonalToolbar toolbarbutton[type="menu-button"],
#PersonalToolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button[open] + .toolbarbutton-menubutton-dropmarker > .dropmarker-icon,
#PersonalToolbar .toolbarbutton-1[open] > .toolbarbutton-menubutton-button,
#PersonalToolbar .toolbarbutton-1[open] > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon,
#PersonalToolbar .toolbarbutton-1:not([checked]):not([open]):not(:active),
#PersonalToolbar .toolbarbutton-1:not([buttonover]):not([open]):not(:active) > .toolbarbutton-menubutton-dropmarker:not([disabled]) > .dropmarker-icon {
  appearance: none !important;
  background: rgba(151,152,153,.05) linear-gradient(rgba(251,252,253,.95), rgba(246,247,248,.47) 49%, 
			  rgba(231,232,233,.45) 51%, rgba(225,226,229,.3)) !important;
  border-color: rgba(0,0,0,.12) rgba(0,0,0,.19) rgba(0,0,0,.38) !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
			  0 0 0 2px rgba(255,255,255,.1) inset,
			  0 0 0 1px rgba(0,0,0,.4) inset !important;
}
#PersonalToolbar .toolbarbutton-1:not([disabled=true]) > .toolbarbutton-menubutton-button[open] + .toolbarbutton-menubutton-dropmarker > .dropmarker-icon,
#PersonalToolbar .toolbarbutton-1:not([disabled=true]):is(:hover,[open]) > .toolbarbutton-menubutton-button ,
#PersonalToolbar .toolbarbutton-1:not([disabled=true]):is(:hover,[open]) > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon,
#PersonalToolbar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active):hover,
#PersonalToolbar .toolbarbutton-1:not([buttonover]):not([open]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled]) > .dropmarker-icon {
  background-color: hsla(190,60%,70%,.5) !important;
  border-color: hsla(190,50%,65%,.8) hsla(190,50%,50%,.8) hsla(190,50%,40%,.8) !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
			  0 0 0 1.5px rgba(255,255,255,.1) inset,
			  0 0 3.5px hsl(190,90%,80%),
			  0 0 0 1px rgba(0,0,0,.4) inset !important;
  transition: background-color .3s ease-in,
			  border-color .2s ease-in,
			  box-shadow .2s ease-in !important;
}
#PersonalToolbar toolbarbutton[type="menu"][open]:not([disabled]),
#PersonalToolbar toolbarbutton[type="menu-button"]:not([open]):hover:not([disabled]):active ,
#PersonalToolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled=true]):is(:hover:active,:active, [open]),
#PersonalToolbar .toolbarbutton-1[open] > .toolbarbutton-menubutton-dropmarker:not([disabled=true]) > .dropmarker-icon,
#PersonalToolbar .toolbarbutton-1:not([disabled=true]):is([open],[checked],:hover:active,:active) {
  background-color: transparent !important;
  border-color: rgba(0,0,0,.65) rgba(0,0,0,.55) rgba(0,0,0,.5) !important;
  box-shadow: 0 0 6.5px rgba(0,0,0,.4) inset,
			  0 0 2px rgba(0,0,0,.4) inset,
			  0 1px 0 rgba(255,255,255,.4),
			  0 0 0 1px rgba(0,0,0,.4) inset !important;
}
#PersonalToolbar toolbarbutton[disabled=true] > .toolbarbutton-icon {
  opacity: .6 !important;
}

#PersonalToolbar toolbarbutton[disabled=true]{
  opacity: 1.0 !important;
}

#PersonalToolbar toolbarbutton.bookmark-item:not(.subviewbutton, [disabled=true], [open]):hover,
#PersonalToolbar .toolbarbutton-1:not([disabled=true], [checked], [open], :active):hover > .toolbarbutton-icon,
#PersonalToolbar .toolbarbutton-1:not([disabled=true], [checked], [open], :active):hover > .toolbarbutton-text,
#PersonalToolbar .toolbarbutton-1:not([disabled=true], [checked], [open], :active):hover > .toolbarbutton-badge-stack {
  background-color: transparent !important;
}

#PersonalToolbar toolbarbutton.bookmark-item:hover:active:not(.subviewbutton, [disabled="true"]),
#PersonalToolbar toolbarbutton.bookmark-item[open="true"],
#PersonalToolbar .toolbarbutton-1:not([disabled=true]):is([open],[checked],:hover:active) > .toolbarbutton-icon,
#PersonalToolbar .toolbarbutton-1:not([disabled=true]):is([open],[checked],:hover:active) > .toolbarbutton-text,
#PersonalToolbar .toolbarbutton-1:not([disabled=true]):is([open],[checked],:hover:active) > .toolbarbutton-badge-stack {
  background-color: transparent !important;
}

/* deep Fx 109 bs and nonsense override */
#PersonalToolbar :is(toolbarbutton.subviewbutton,.toolbaritem-combined-buttons:is(:not([cui-areatype="toolbar"]),[overflowedItem=true]) > toolbarbutton):not([disabled]):hover {
  background-color: unset !important; 
}
